﻿CREATE PROCEDURE [acms].[UserSecurity_GetByUserName]
	@UserName varchar(50),
	@UpdateActivity bit
AS
	IF @UpdateActivity = 1 BEGIN
		Update Users
		Set LastActivity = getDate()
	END

	SELECT *
	FROM [acms].[UserSecurity_View]
	WHERE UserName = @UserName
RETURN 0;